﻿using System;
using System.Collections.Generic;

namespace Adnc.Shared.RpcServices.Rtos
{
    /// <summary>
    /// 订单详情
    /// </summary>
    public class OrderDetailRto
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        public long OrderId { get; set; }

        /// <summary>
        /// 订单Code
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 推荐人
        /// </summary>
        public long? Reference { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string ConsigneeName { get; set; }

        /// <summary>
        /// 收货人电话
        /// </summary>
        public string ConsigneePhone { get; set; }

        /// <summary>
        /// 收货省
        /// </summary>
        public string ConsigneeProvince { get; set; }

        /// <summary>
        /// 收货市
        /// </summary>
        public string ConsigneeCity { get; set; }

        /// <summary>
        /// 收货区/县
        /// </summary>
        public string ConsigneeAreas { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 总价
        /// </summary>
        public decimal Total { get; set; }

        /// <summary>
        /// 物流费用
        /// </summary>
        public decimal Postage { get; set; }

        /// <summary>
        /// 实际支付
        /// </summary>
        public decimal Payment { get; set; }

        /// <summary>
        /// 订单状态  -1：取消，1：待付款，2:待出库 3：待发货，4：待收货，5：订单完成
        /// </summary>
        public int State { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        public int OrderType { get; set; }

        /// <summary>
        /// 付款方式 1：微信 2：余额 3 购物金
        /// </summary>
        public int PayMode { get; set; }

        /// <summary>
        /// 是否购买至云仓
        /// </summary>
        public bool Warehouse { get; set; }

        /// <summary>
        /// 云仓类型
        /// </summary>
        public int? WarehouseType { get; set; }

        /// <summary>
        /// 订单商品
        /// </summary>
        public List<OrderGoodsDetailRto> OrderGoods { get; set; }
    }

    /// <summary>
    /// 订单商品
    /// </summary>
    public class OrderGoodsDetailRto
    {
        /// <summary>
        /// 订单商品记录ID
        /// </summary>
        public long OrderGoodsId {get;set;}

        /// <summary>
        /// 商品ID
        /// </summary>
        public long GoodsId { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        public string GoodsName { get; set; }

        /// <summary>
        /// 商品规格
        /// </summary>
        public long GoodsSizeId { get; set; }

        /// <summary>
        /// 规格名称
        /// </summary>
        public string GoodsSizeName { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 商品价格
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 商品总价
        /// </summary>
        public decimal TotalPrice { get; set; }

        /// <summary>
        /// 商品图片
        /// </summary>
        public string GoodsImage { get; set; }

        /// <summary>
        /// 商品数据镜像
        /// </summary>
        public string ImagesGoods { get; set; }

        /// <summary>
        /// 是否是赠品
        /// </summary>
        public bool IsGift { get; set; } = false;

        /// <summary>
        /// 是否使用了抵扣券
        /// </summary>
        public bool UseDeductionCoupons { get; set; }
    }
}